﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.AuditLogging;
using Volo.Abp.Domain;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;

namespace AbpVnext__Comon
{
    /// <summary>
    /// 所有的项目，抽象成AbpModule
    /// 方便使用和维护。
    ///  项目服务隔离 ，好处：独立维护
    /// </summary>
    [DependsOn(
        typeof(AbpDddDomainModule),
        typeof(AbpIdentityDomainModule)
        , typeof(AbpPermissionManagementDomainModule)
        //, typeof(AbpAuditLoggingDomainModule) //审计日志模块
        , typeof(AbpSettingManagementDomainModule) //设置模块
        , typeof(AbpTenantManagementDomainModule) //多租户模块
        , typeof(AbpFeatureManagementDomainModule) //特征模块
        ,typeof(AbpOpenIddictDomainModule)  // 分布式认证模块
        )]
    public class DomainMoudule : AbpModule
    {
        /// <summary>
        /// 依赖注入
        /// </summary>
        /// <param name="context"></param>
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            //配置虚拟文件
            Configure<AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded<DomainMoudule>();
            });
        }
    }
}
